Deprecate all the public API that is using GdkColor struct
authorJavier Jardón <jjardon@gnome.org>
Tue, 13 Dec 2011 11:02:13 +0000 (11:02 +0000)
committerJavier Jardón <jjardon@gnome.org>
Thu, 22 Dec 2011 02:59:39 +0000 (02:59 +0000)
13 files changed:
gdk/gdkcairo.c
gdk/gdkcairo.h
gdk/gdkwindow.c
gdk/gdkwindow.h
gtk/gtkcellrenderer.c
gtk/gtkcellrenderertext.c
gtk/gtkcellview.c
gtk/gtkcellview.h
gtk/gtkcolorbutton.c
gtk/gtkcolorbutton.h
gtk/gtkcolorsel.c
gtk/gtkcolorsel.h
gtk/gtktexttag.c

index ea58c428f9d0df9b736e8da84dc888148eb8238f..39320f8a53f579be59db929f9825dbec6cb962c6 100644 (file)
@@ -89,6 +89,8 @@ gdk_cairo_get_clip_rectangle (cairo_t      *cr,
  * Sets the specified #GdkColor as the source color of @cr.
  *
  * Since: 2.8
+ *
+ * Deprecated: 3.4: Use gdk_cairo_set_source_rgba() instead
  */
 void
 gdk_cairo_set_source_color (cairo_t        *cr,
index f2cf7bd7e1dc457524b9114a0501f8c7c63ca462..20c995bbe7f72ebd26dad00cba5e6140889a2439 100644 (file)
@@ -35,8 +35,6 @@ cairo_t  * gdk_cairo_create             (GdkWindow          *window);
 gboolean   gdk_cairo_get_clip_rectangle (cairo_t            *cr,
                                          GdkRectangle       *rect);
 
-void       gdk_cairo_set_source_color   (cairo_t              *cr,
-                                         const GdkColor       *color);
 void       gdk_cairo_set_source_rgba    (cairo_t              *cr,
                                          const GdkRGBA        *rgba);
 void       gdk_cairo_set_source_pixbuf  (cairo_t              *cr,
@@ -57,6 +55,10 @@ cairo_region_t *
            gdk_cairo_region_create_from_surface
                                         (cairo_surface_t      *surface);
 
+GDK_DEPRECATED_FOR(gdk_cairo_set_source_rgba)
+void       gdk_cairo_set_source_color   (cairo_t              *cr,
+                                         const GdkColor       *color);
+
 G_END_DECLS
 
 #endif /* __GDK_CAIRO_H__ */
index c0e9236447c3b44a9e47812d653ecd06b7032fed..a6170a9437b7cbcc955a7d88ccef87beb1630aa5 100644 (file)
@@ -6542,6 +6542,8 @@ gdk_window_move_region (GdkWindow       *window,
  * implementing a custom widget.)
  *
  * See also gdk_window_set_background_pattern().
+ *
+ * Deprecated: 3.4: Use gdk_window_set_background_rgba() instead.
  */
 void
 gdk_window_set_background (GdkWindow      *window,
index 81dda7c4fb976bec2164120e7c793cb2a6608ff1..f6b2be79a709049f9906d0370123d2ee0aa84b74 100644 (file)
@@ -657,6 +657,7 @@ void          gdk_window_set_startup_id    (GdkWindow     *window,
                                            const gchar   *startup_id);
 void          gdk_window_set_transient_for (GdkWindow     *window,
                                            GdkWindow     *parent);
+GDK_DEPRECATED_FOR(gdk_window_set_background_rgba)
 void         gdk_window_set_background  (GdkWindow       *window,
                                          const GdkColor  *color);
 void          gdk_window_set_background_rgba (GdkWindow *window,
index 1cef97bffae9812ff7f152636cb3dd4d1c1df827..d701b74c4fbc096cb838039ba0adc885e4f2fe7b 100644 (file)
@@ -380,13 +380,20 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
                                                        NULL,
                                                        GTK_PARAM_WRITABLE));
 
+  /**
+   * GtkCellRenderer:cell-background-gdk:
+   *
+   * Cell background as a #GdkColor
+   *
+   * Deprecated: 3.4: Use #GtkCellRenderer:cell-background-rgba instead.
+   */
   g_object_class_install_property (object_class,
                                   PROP_CELL_BACKGROUND_GDK,
                                   g_param_spec_boxed ("cell-background-gdk",
                                                       P_("Cell background color"),
                                                       P_("Cell background color as a GdkColor"),
                                                       GDK_TYPE_COLOR,
-                                                      GTK_PARAM_READWRITE));
+                                                      GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
   /**
    * GtkCellRenderer:cell-background-rgba:
    *
index ea8973cff4da933daf2a3916cca3010a73b17b57..580e338e55580fa1e6e742cb0c291e29da2fccf2 100644 (file)
@@ -290,13 +290,20 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
                                                         NULL,
                                                         GTK_PARAM_WRITABLE));
 
+  /**
+   * GtkCellRendererText:background-gdk:
+   *
+   * Background color as a #GdkColor
+   *
+   * Deprecated: 3.4: Use #GtkCellRendererText:background-rgba instead.
+   */
   g_object_class_install_property (object_class,
                                    PROP_BACKGROUND_GDK,
                                    g_param_spec_boxed ("background-gdk",
                                                        P_("Background color"),
                                                        P_("Background color as a GdkColor"),
                                                        GDK_TYPE_COLOR,
-                                                       GTK_PARAM_READWRITE));  
+                                                       GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
 
   /**
    * GtkCellRendererText:background-rgba:
@@ -320,13 +327,20 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
                                                         NULL,
                                                         GTK_PARAM_WRITABLE));
 
+  /**
+   * GtkCellRendererText:foreground-gdk:
+   *
+   * Foreground color as a #GdkColor
+   *
+   * Deprecated: 3.4: Use #GtkCellRendererText:foreground-rgba instead.
+   */
   g_object_class_install_property (object_class,
                                    PROP_FOREGROUND_GDK,
                                    g_param_spec_boxed ("foreground-gdk",
                                                        P_("Foreground color"),
                                                        P_("Foreground color as a GdkColor"),
                                                        GDK_TYPE_COLOR,
-                                                       GTK_PARAM_READWRITE));
+                                                       GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
 
   /**
    * GtkCellRendererText:foreground-rgba:
index b6ce31faf7e2e96ce7296b3f1f65bdcc9b08b1e0..10532fc66655b722f405fcaf8777e4f8750d5030 100644 (file)
@@ -192,13 +192,21 @@ gtk_cell_view_class_init (GtkCellViewClass *klass)
                                                         P_("Background color as a string"),
                                                         NULL,
                                                         GTK_PARAM_WRITABLE));
+
+  /**
+   * GtkCellView:background-gdk
+   *
+   * The background color as a #GdkColor
+   *
+   * Deprecated: 3.4: Use #GtkCellView:background-rgba instead.
+   */
   g_object_class_install_property (gobject_class,
                                    PROP_BACKGROUND_GDK,
                                    g_param_spec_boxed ("background-gdk",
                                                       P_("Background color"),
                                                       P_("Background color as a GdkColor"),
                                                       GDK_TYPE_COLOR,
-                                                      GTK_PARAM_READWRITE));
+                                                      GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
   /**
    * GtkCellView:background-rgba
    *
@@ -1268,6 +1276,8 @@ gtk_cell_view_get_size_of_row (GtkCellView    *cell_view,
  * Sets the background color of @view.
  *
  * Since: 2.6
+ *
+ * Deprecated: 3.4: Use gtk_cell_view_set_background_rgba() instead.
  */
 void
 gtk_cell_view_set_background_color (GtkCellView    *cell_view,
index b8c5f1818347dd69ec57b11d1d7be00ebb5c269c..797c7a51c69eaa15f017bc2721627bcc8177559e 100644 (file)
@@ -75,8 +75,6 @@ GtkTreeModel     *gtk_cell_view_get_model               (GtkCellView     *cell_v
 void              gtk_cell_view_set_displayed_row       (GtkCellView     *cell_view,
                                                          GtkTreePath     *path);
 GtkTreePath      *gtk_cell_view_get_displayed_row       (GtkCellView     *cell_view);
-void              gtk_cell_view_set_background_color    (GtkCellView     *cell_view,
-                                                         const GdkColor  *color);
 void              gtk_cell_view_set_background_rgba     (GtkCellView     *cell_view,
                                                          const GdkRGBA   *rgba);
 gboolean          gtk_cell_view_get_draw_sensitive      (GtkCellView     *cell_view);
@@ -90,6 +88,9 @@ GDK_DEPRECATED_FOR(gtk_widget_get_preferred_size)
 gboolean          gtk_cell_view_get_size_of_row         (GtkCellView     *cell_view,
                                                          GtkTreePath     *path,
                                                          GtkRequisition  *requisition);
+GDK_DEPRECATED_FOR(gtk_cell_view_set_background_rgba)
+void              gtk_cell_view_set_background_color    (GtkCellView     *cell_view,
+                                                         const GdkColor  *color);
 
 G_END_DECLS
 
index 7494565dccd20ffaf90d46b9b19cbc5ae29bf2b5..0be2b895b9fbed9d3cecb8fb4976899ea1aed9c6 100644 (file)
@@ -193,6 +193,8 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
    * The selected color.
    *
    * Since: 2.4
+   *
+   * Deprecated: 3.4: Use #GtkColorButton:rgba instead.
    */
   g_object_class_install_property (gobject_class,
                                    PROP_COLOR,
@@ -200,7 +202,7 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
                                                        P_("Current Color"),
                                                        P_("The selected color"),
                                                        GDK_TYPE_COLOR,
-                                                       GTK_PARAM_READWRITE));
+                                                       GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
 
   /**
    * GtkColorButton:alpha:
@@ -555,6 +557,8 @@ gtk_color_button_new (void)
  * Returns: a new color button
  *
  * Since: 2.4
+ *
+ * Deprecated: 3.4: Use gtk_color_button_new_with_rgba() instead.
  */
 GtkWidget *
 gtk_color_button_new_with_color (const GdkColor *color)
@@ -691,6 +695,8 @@ gtk_color_button_clicked (GtkButton *button)
  * Sets the current color to be @color.
  *
  * Since: 2.4
+ *
+ * Deprecated: Use gtk_color_button_set_rgba() instead.
  */
 void
 gtk_color_button_set_color (GtkColorButton *color_button,
@@ -741,6 +747,8 @@ gtk_color_button_set_alpha (GtkColorButton *color_button,
  * Sets @color to be the current color in the #GtkColorButton widget.
  *
  * Since: 2.4
+ *
+ * Deprecated: 3.4: Use gtk_color_button_get_rgba() instead.
  */
 void
 gtk_color_button_get_color (GtkColorButton *color_button,
index 7e1aae1a95ea356e8c202ee58ee41e2dcae78dc1..8f2d2ca58895d312d120430ea9973fe569d458d4 100644 (file)
@@ -75,14 +75,9 @@ struct _GtkColorButtonClass {
 
 GType      gtk_color_button_get_type       (void) G_GNUC_CONST;
 GtkWidget *gtk_color_button_new            (void);
-GtkWidget *gtk_color_button_new_with_color (const GdkColor *color);
 GtkWidget *gtk_color_button_new_with_rgba  (const GdkRGBA  *rgba);
-void       gtk_color_button_set_color      (GtkColorButton *color_button,
-                                            const GdkColor *color);
 void       gtk_color_button_set_alpha      (GtkColorButton *color_button,
                                             guint16         alpha);
-void       gtk_color_button_get_color      (GtkColorButton *color_button,
-                                            GdkColor       *color);
 guint16    gtk_color_button_get_alpha      (GtkColorButton *color_button);
 void       gtk_color_button_set_use_alpha  (GtkColorButton *color_button,
                                             gboolean        use_alpha);
@@ -95,6 +90,15 @@ void       gtk_color_button_set_title      (GtkColorButton *color_button,
                                             const gchar    *title);
 const gchar *gtk_color_button_get_title    (GtkColorButton *color_button);
 
+GDK_DEPRECATED_FOR(gtk_color_button_new_with_rgba)
+GtkWidget *gtk_color_button_new_with_color (const GdkColor *color);
+GDK_DEPRECATED_FOR(gtk_color_button_set_rgba)
+void       gtk_color_button_set_color      (GtkColorButton *color_button,
+                                            const GdkColor *color);
+GDK_DEPRECATED_FOR(gtk_color_button_get_rgba)
+void       gtk_color_button_get_color      (GtkColorButton *color_button,
+                                            GdkColor       *color);
+
 
 G_END_DECLS
 
index 32f18ce715f0c1fd642a1c95e52feb57246484ae..85de544edefe50f35a51839daf7abee99cab501d 100644 (file)
@@ -329,13 +329,21 @@ gtk_color_selection_class_init (GtkColorSelectionClass *klass)
                                                          P_("Whether a palette should be used"),
                                                          FALSE,
                                                          GTK_PARAM_READWRITE));
+
+  /**
+   * GtkColorSelection:current-color
+   *
+   * The current GdkColor color.
+   *
+   * Deprecated: 3.4: Use #GtkColorSelection:current-rgba instead.
+   */
   g_object_class_install_property (gobject_class,
                                    PROP_CURRENT_COLOR,
                                    g_param_spec_boxed ("current-color",
                                                        P_("Current Color"),
                                                        P_("The current color"),
                                                        GDK_TYPE_COLOR,
-                                                       GTK_PARAM_READWRITE));
+                                                       GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
   g_object_class_install_property (gobject_class,
                                    PROP_CURRENT_ALPHA,
                                    g_param_spec_uint ("current-alpha",
@@ -2488,6 +2496,8 @@ gtk_color_selection_set_has_palette (GtkColorSelection *colorsel,
  *
  * The first time this is called, it will also set
  * the original color to be @color too.
+ *
+ * Deprecated: 3.4: Use gtk_color_selection_set_current_rgba() instead.
  */
 void
 gtk_color_selection_set_current_color (GtkColorSelection *colorsel,
@@ -2556,6 +2566,8 @@ gtk_color_selection_set_current_alpha (GtkColorSelection *colorsel,
  * @color: (out): a #GdkColor to fill in with the current color
  *
  * Sets @color to be the current color in the GtkColorSelection widget.
+ *
+ * Deprecated: 3.4: Use gtk_color_selection_get_current_rgba() instead.
  */
 void
 gtk_color_selection_get_current_color (GtkColorSelection *colorsel,
@@ -2602,6 +2614,8 @@ gtk_color_selection_get_current_alpha (GtkColorSelection *colorsel)
  * as it might seem confusing to have that color change.
  * Calling gtk_color_selection_set_current_color() will also
  * set this color the first time it is called.
+ *
+ * Deprecated: 3.4: Use gtk_color_selection_set_previous_rgba() instead.
  */
 void
 gtk_color_selection_set_previous_color (GtkColorSelection *colorsel,
@@ -2661,6 +2675,8 @@ gtk_color_selection_set_previous_alpha (GtkColorSelection *colorsel,
  * @color: (out): a #GdkColor to fill in with the original color value
  *
  * Fills @color in with the original color value.
+ *
+ * Deprecated: 3.4: Use gtk_color_selection_get_previous_rgba() instead.
  */
 void
 gtk_color_selection_get_previous_color (GtkColorSelection *colorsel,
index 0dbdae11f8a656d25e6200d61639f3137e889a0f..d8b787712e409b56d9425392c193674584e0911a 100644 (file)
@@ -98,19 +98,11 @@ void       gtk_color_selection_set_has_palette         (GtkColorSelection *color
                                                        gboolean           has_palette);
 
 
-void     gtk_color_selection_set_current_color   (GtkColorSelection *colorsel,
-                                                 const GdkColor    *color);
 void     gtk_color_selection_set_current_alpha   (GtkColorSelection *colorsel,
                                                  guint16            alpha);
-void     gtk_color_selection_get_current_color   (GtkColorSelection *colorsel,
-                                                 GdkColor          *color);
 guint16  gtk_color_selection_get_current_alpha   (GtkColorSelection *colorsel);
-void     gtk_color_selection_set_previous_color  (GtkColorSelection *colorsel,
-                                                 const GdkColor    *color);
 void     gtk_color_selection_set_previous_alpha  (GtkColorSelection *colorsel,
                                                  guint16            alpha);
-void     gtk_color_selection_get_previous_color  (GtkColorSelection *colorsel,
-                                                 GdkColor          *color);
 guint16  gtk_color_selection_get_previous_alpha  (GtkColorSelection *colorsel);
 
 void     gtk_color_selection_set_current_rgba    (GtkColorSelection *colorsel,
@@ -132,6 +124,20 @@ gchar*   gtk_color_selection_palette_to_string   (const GdkColor    *colors,
 
 GtkColorSelectionChangePaletteWithScreenFunc gtk_color_selection_set_change_palette_with_screen_hook (GtkColorSelectionChangePaletteWithScreenFunc func);
 
+GDK_DEPRECATED_FOR(gtk_color_selection_set_current_rgba)
+void     gtk_color_selection_set_current_color   (GtkColorSelection *colorsel,
+                                                  const GdkColor    *color);
+GDK_DEPRECATED_FOR(gtk_color_selection_get_current_rgba)
+void     gtk_color_selection_get_current_color   (GtkColorSelection *colorsel,
+                                                  GdkColor          *color);
+GDK_DEPRECATED_FOR(gtk_color_selection_set_previous_rgba)
+void     gtk_color_selection_set_previous_color  (GtkColorSelection *colorsel,
+                                                  const GdkColor    *color);
+GDK_DEPRECATED_FOR(gtk_color_selection_get_previous_rgba)
+void     gtk_color_selection_get_previous_color  (GtkColorSelection *colorsel,
+                                                  GdkColor          *color);
+
+
 G_END_DECLS
 
 #endif /* __GTK_COLOR_SELECTION_H__ */
index 81f793267002c92d004de8659a53c780222976b5..10a849d684537ffe5f2287ca851fc510dc39ff3b 100644 (file)
@@ -200,13 +200,20 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
                                                         NULL,
                                                         GTK_PARAM_WRITABLE));
 
+  /**
+   * GtkTextTag:background-gdk:
+   *
+   * Background color as a #GdkColor.
+   *
+   * Deprecated: 3.4: Use #GtkTextTag:background-rgba instead.
+   */
   g_object_class_install_property (object_class,
                                    PROP_BACKGROUND_GDK,
                                    g_param_spec_boxed ("background-gdk",
                                                        P_("Background color"),
                                                        P_("Background color as a GdkColor"),
                                                        GDK_TYPE_COLOR,
-                                                       GTK_PARAM_READWRITE));
+                                                       GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
 
   /**
    * GtkTextTag:background-rgba:
@@ -239,13 +246,20 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
                                                         NULL,
                                                         GTK_PARAM_WRITABLE));
 
+  /**
+   * GtkTextTag:foreground-gdk:
+   *
+   * Foreground color as a #GdkColor.
+   *
+   * Deprecated: 3.4: Use #GtkTextTag:foreground-rgba instead.
+   */
   g_object_class_install_property (object_class,
                                    PROP_FOREGROUND_GDK,
                                    g_param_spec_boxed ("foreground-gdk",
                                                        P_("Foreground color"),
                                                        P_("Foreground color as a GdkColor"),
                                                        GDK_TYPE_COLOR,
-                                                       GTK_PARAM_READWRITE));
+                                                       GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
 
   /**
    * GtkTextTag:foreground-rgba:
@@ -553,6 +567,8 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
    * The paragraph background color as a as a #GdkColor.
    *
    * Since: 2.8
+   *
+   * Deprecated: 3.4: Use #GtkTextTag:paragraph-background-rgba instead.
    */
   g_object_class_install_property (object_class,
                                    PROP_PARAGRAPH_BACKGROUND_GDK,
@@ -560,7 +576,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
                                                        P_("Paragraph background color"),
                                                        P_("Paragraph background color as a GdkColor"),
                                                        GDK_TYPE_COLOR,
-                                                       GTK_PARAM_READWRITE));
+                                                       GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
 
   /**
    * GtkTextTag:paragraph-background-rgba: